package logica;

import java.util.ArrayList;
import java.util.Date;

import persistencia.daos.DAOObstaculos;

public class Escenario {
	
	private int id;
	private String nombreImagen;
	private Obstaculos obstaculos;
	//NUEVO
	private float ancho;
	private float alto;	

	public Escenario() {
		super();
	}

	public Escenario(int idEs, String imagen, float ancho, float alto) throws Exception{
		id = idEs;
		nombreImagen = imagen;
		this.ancho = ancho;
		this.alto = alto;
		try {
			DAOObstaculos obstaculosDefinidos = new DAOObstaculos(id);
			obstaculos = new Obstaculos(obstaculosDefinidos.obtenerObstaculosDefinidos(idEs));
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			throw e;
		}
	
	}
	
	public Escenario(int id, String imagen, float ancho, float alto, Obstaculos obstaculos) {
		super();
		this.id = id;
		this.nombreImagen = imagen;
		this.ancho = ancho;
		this.alto = alto;
		this.obstaculos = obstaculos;
	}
	
	public Escenario(int id,String imagen, Obstaculos obstaculos, float ancho, float alto) {
		super();
		this.id = id;
		nombreImagen = imagen;
		this.obstaculos = obstaculos;
		this.ancho = ancho;
		this.alto = alto;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	public void setObstaculo(Obstaculo obs){
		obstaculos.setObstaculo(obs);
	}
	
	public Obstaculo getObstaculo(int id){
		return obstaculos.getObstaculo(id);
	}

	public Obstaculos getObstaculos() {
		return obstaculos;
	}

	public void setObstaculos(Obstaculos obstaculos) {
		this.obstaculos = obstaculos;
	}

	public String getNombreImagen() {
		return nombreImagen;
	}

	public void setNombreImagen(String nombreImagen) {
		this.nombreImagen = nombreImagen;
	}

	public float getAncho() {
		return ancho;
	}

	public void setAncho(float ancho) {
		this.ancho = ancho;
	}

	public float getAlto() {
		return alto;
	}

	public void setAlto(float alto) {
		this.alto = alto;
	}
	
	

}
